1. Technical Field
The present invention relates in general to a method and system for improved data processing and in particular to an improved method and system within a data processing system for saving and restoring the operating state of the data processing system. Still more particularly, the present invention relates to an improved method and system within a data processing system for storing the operating state of the data processing system to a nonvolatile mass storage device and thereafter restoring the operating state of the data processing system from the nonvolatile mass storage device.
2. Description of the Related Art
Many data processing systems, and in particular portable data processing systems, are equipped with features which enable a data processing system to maintain its operating state while operating in a low power mode. This so-called xe2x80x9csleepxe2x80x9d mode enables a user to retain data associated with the operating system and active applications while essentially suspending all operations of the data processing system. The ability to operate in a low power sleep mode eliminates both the need to power off a data processing system during periods of disuse to conserve battery power and the delay attendant with returning to a particular operating system and application program context once power is restored.
Typically, sleep modes are implemented utilizing a combination of power reduction techniques, such as those specified in the Advanced Power Management (APM) specifications. For example, a data processing system entering sleep mode first saves volatile data associated with the operating system and active applications to a battery-powered memory such as dynamic random access memory (DRAM) or static random access memory (SRAM). The data processing system then reduces its power consumption by slowing the system clock, parking the hard drive, blanking the display screen, and disabling all other unnecessary functions. Thereafter, when the user desires to return the data processing system to normal operation, the user simply inputs a predetermined command, such as a particular keystroke, to the data processing system, which returns the hardware to normal operation and restores the operating system and active application programs to their previous context.
Although conventional techniques of power management enable a data processing system user to avoid the frustrating delay which accompanies rebooting the system and to reduce total power consumption as compared to operating the system at full power, conventional sleep modes have several major shortcomings. Computer users, and in particular portable computer users relying on battery power, risk the loss of data due to failure of the battery supplying power to the memory utilized to store the operating state of the data processing system. In addition, because conventional sleep modes are implemented to a great extent in hardware, sleep modes have heretofore only been available on data processing systems that are equipped with hardware which supports a low power mode of operation.
Consequently, it would be desirable to provide an improved method and system within a data processing system for saving the operating state of the data processing system to nonvolatile storage which does not require battery-supplied power. Furthermore, it would be desirable to provide an improved method and system for restoring the operating state of the data processing system from the nonvolatile storage.
It is therefore one object of the present invention to provide an improved data processing system.
It is another object of the present invention to provide an improved method and system within a data processing system for saving and restoring the operating state of the data processing system.
It is yet another object of the present invention to provide an improved method and system within a data processing system for storing the operating state of the data processing system to a nonvolatile mass storage device and thereafter restoring the operating state of the data processing system from the nonvolatile mass storage device.
The foregoing objects are achieved as is now described. A method and system are disclosed for efficiently storing an operating state of a data processing system having a volatile memory within a nonvolatile mass storage device. In response to a selected input, a determination is made whether storing the operating state of the data processing system is feasible. If storing the operating state is feasible, scheduling of tasks to be performed by the data processing system is halted. Data not required for operation of the data processing system is then removed from the volatile memory. The operating state of the data processing system is stored within the nonvolatile mass storage device, thereby enabling the operating state of the data processing system to be efficiently restored. Thereafter, power is removed from the data processing system. In response to restoring power to the data processing system, a determination is made whether the operating state of the data processing system is stored within the nonvolatile mass storage device. In response to a determination that the operating state of the data processing system is stored within the nonvolatile mass storage device, the operating state of the data processing system is loaded from the nonvolatile mass storage device, thereby restoring the operating state of the data processing system.
The above as well as additional objectives, features, and advantages of the present invention will become apparent in the following detailed written description.